how to check if a value exists in map golang

154

how to check if a value exists in map golang -

if val, ok := dict["foo"]; ok {
    //do something here
}

Comments

Submit
0 Comments